package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.EquityPackMapper;
import com.ktgj.customer.domain.EquityPack;
import com.ktgj.customer.service.IEquityPackService;

/**
 * 权益包Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-01
 */
@Service
public class EquityPackServiceImpl implements IEquityPackService 
{
    @Autowired
    private EquityPackMapper equityPackMapper;

    /**
     * 查询权益包
     * 
     * @param equitypackId 权益包ID
     * @return 权益包
     */
    @Override
    public EquityPack selectEquityPackById(Long equitypackId)
    {
        return equityPackMapper.selectEquityPackById(equitypackId);
    }

    /**
     * 查询权益包列表
     * 
     * @param equityPack 权益包
     * @return 权益包
     */
    @Override
    public List<EquityPack> selectEquityPackList(EquityPack equityPack)
    {
        return equityPackMapper.selectEquityPackList(equityPack);
    }

    /**
     * 新增权益包
     * 
     * @param equityPack 权益包
     * @return 结果
     */
    @Override
    public int insertEquityPack(EquityPack equityPack)
    {
        equityPack.setCreateTime(DateUtils.getNowDate());
        return equityPackMapper.insertEquityPack(equityPack);
    }

    /**
     * 修改权益包
     * 
     * @param equityPack 权益包
     * @return 结果
     */
    @Override
    public int updateEquityPack(EquityPack equityPack)
    {
        equityPack.setUpdateTime(DateUtils.getNowDate());
        return equityPackMapper.updateEquityPack(equityPack);
    }

    /**
     * 批量删除权益包
     * 
     * @param equitypackIds 需要删除的权益包ID
     * @return 结果
     */
    @Override
    public int deleteEquityPackByIds(Long[] equitypackIds)
    {
        return equityPackMapper.deleteEquityPackByIds(equitypackIds);
    }

    /**
     * 删除权益包信息
     * 
     * @param equitypackId 权益包ID
     * @return 结果
     */
    @Override
    public int deleteEquityPackById(Long equitypackId)
    {
        return equityPackMapper.deleteEquityPackById(equitypackId);
    }
}
